<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <style>
      .wrap {
        height: 600px;
        border: 1px;
        overflow: auto;
        width: 600px;
      }
      .wrap > div {
        height: 5000px;
        background: linear-gradient(pink, yellow);
      }
    </style>
    <script src="./src/throttle.js"></script>
    <script src="./src/rAF.js"></script>
    <script src="./lib/throttle.js"></script>
  </head>
  <body>
    <div class="wrap">
      <div>
        padding
      </div>
    </div>
    <button id="sleep">sleep(1000)</button>
    <script>
      var wrap = document.querySelector(".wrap");
      var echo = function(e) {
        console.log(this);
        console.log(e.target.scrollTop);
      };
      wrap.addEventListener("scroll", rAF(echo));
    </script>
  </body>
</html>
